package com.jianguo.order.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jianguo.common.core.domain.BaseEntity;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jianguo.common.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;

/**
 * 订单对象 pz_order
 *
 * @author xjj
 * @date 2024-03-30
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PzOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 序号 */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    /** 客户id */
    @Excel(name = "客户id")
    private String userId;
    /** 陪诊员id */
    @Excel(name = "陪诊员id")
    private String companionId;
    /** 地址id */
    @Excel(name = "地址id")
    private String addressId;
    /** 患者id */
    @Excel(name = "患者id")
    private String patientId;
    /** 用户名 */
    @Excel(name = "用户名")
    private String username;
    /** 地址 */
    @Excel(name = "地址")
    private String address;
    /** 电话 */
    @Excel(name = "电话")
    private String phone;
    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNumber;
    /** 实收金额 */
    @Excel(name = "实收金额")
    private Long amount;
    /** 支付方式 */
    @Excel(name = "支付方式")
    private String payMethod;
    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date paytime;
    /** 订单状态 0待接单，1待支付，2待服务，3服务中，4已完成，5已取消 */
    @Excel(name = "订单状态")
    private Long status;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("companionId", getCompanionId())
                .append("addressId", getAddressId())
                .append("patientId", getPatientId())
                .append("username", getUsername())
                .append("address", getAddress())
                .append("phone", getPhone())
                .append("orderNumber", getOrderNumber())
                .append("amount", getAmount())
                .append("payMethod", getPayMethod())
                .append("paytime", getPaytime())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("deleted", getDeleted())
                .append("remark", getRemark())
                .toString();
    }
}
